/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package apus.command;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The <code>AbstractCommand</code> class represents abstract command.
 * @author  Maxim Vasilevsky
 * @author  Roman Dyatkovsky
 * @since APUS v0.3
 * @see java.util.HashMap
 */
public abstract class AbstractCommand {
    
    private String name;
    
    /**
     * Field, contains collection of parameters, required to execute command.
     */
    protected Map<String, String> params = new HashMap<>();
    
    public AbstractCommand (String name){
        this.name = name;
    }
    
    public String getName(){
        return name;
    }
    
    /**
     * This method fill list of parameters.
     * @param paramName Name of parameter
     * @param paramValue Value of parameter
     */
    public void setParameter(String paramName, String paramValue) {
        params.put(paramName, paramValue);   
    }
    
    /**
     * Every command, which extends abstract command, provides list of required 
     * parameters.
     * @return List of parameter names
     */
    public List<String> getParamNames() {
        return Collections.<String>emptyList();
    }
    
    /**
     * An abstract method that contains the functionality.
     */
    public abstract void execute();
            
}
